Optimal. Leaf size=87 \[ \frac {2 \sin ^3(c+d x)}{3 a^2 d}-\frac {2 \sin (c+d x)}{a^2 d}+\frac {\sin (c+d x) \cos ^3(c+d x)}{4 a^2 d}+\frac {7 \sin (c+d x) \cos (c+d x)}{8 a^2 d}+\frac {7 x}{8 a^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.23, antiderivative size = 87, normalized size of antiderivative = 1.00, number of steps used = 11, number of rules used = 6, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {3872, 2869, 2757, 2635, 8, 2633} \[ \frac {2 \sin ^3(c+d x)}{3 a^2 d}-\frac {2 \sin (c+d x)}{a^2 d}+\frac {\sin (c+d x) \cos ^3(c+d x)}{4 a^2 d}+\frac {7 \sin (c+d x) \cos (c+d x)}{8 a^2 d}+\frac {7 x}{8 a^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2633
Rule 2635
Rule 2757
Rule 2869
Rule 3872
Rubi steps
\begin {align*} \int \frac {\sin ^4(c+d x)}{(a+a \sec (c+d x))^2} \, dx &=\int \frac {\cos ^2(c+d x) \sin ^4(c+d x)}{(-a-a \cos (c+d x))^2} \, dx\\ &=\frac {\int \cos ^2(c+d x) (-a+a \cos (c+d x))^2 \, dx}{a^4}\\ &=\frac {\int \left (a^2 \cos ^2(c+d x)-2 a^2 \cos ^3(c+d x)+a^2 \cos ^4(c+d x)\right ) \, dx}{a^4}\\ &=\frac {\int \cos ^2(c+d x) \, dx}{a^2}+\frac {\int \cos ^4(c+d x) \, dx}{a^2}-\frac {2 \int \cos ^3(c+d x) \, dx}{a^2}\\ &=\frac {\cos (c+d x) \sin (c+d x)}{2 a^2 d}+\frac {\cos ^3(c+d x) \sin (c+d x)}{4 a^2 d}+\frac {\int 1 \, dx}{2 a^2}+\frac {3 \int \cos ^2(c+d x) \, dx}{4 a^2}+\frac {2 \operatorname {Subst}\left (\int \left (1-x^2\right ) \, dx,x,-\sin (c+d x)\right )}{a^2 d}\\ &=\frac {x}{2 a^2}-\frac {2 \sin (c+d x)}{a^2 d}+\frac {7 \cos (c+d x) \sin (c+d x)}{8 a^2 d}+\frac {\cos ^3(c+d x) \sin (c+d x)}{4 a^2 d}+\frac {2 \sin ^3(c+d x)}{3 a^2 d}+\frac {3 \int 1 \, dx}{8 a^2}\\ &=\frac {7 x}{8 a^2}-\frac {2 \sin (c+d x)}{a^2 d}+\frac {7 \cos (c+d x) \sin (c+d x)}{8 a^2 d}+\frac {\cos ^3(c+d x) \sin (c+d x)}{4 a^2 d}+\frac {2 \sin ^3(c+d x)}{3 a^2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.59, size = 91, normalized size = 1.05 \[ \frac {\cos ^4\left (\frac {1}{2} (c+d x)\right ) \sec ^2(c+d x) \left (-144 \sin (c+d x)+48 \sin (2 (c+d x))-16 \sin (3 (c+d x))+3 \sin (4 (c+d x))+2 \tan \left (\frac {c}{2}\right )+84 d x\right )}{24 a^2 d (\sec (c+d x)+1)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.99, size = 50, normalized size = 0.57 \[ \frac {21 \, d x + {\left (6 \, \cos \left (d x + c\right )^{3} - 16 \, \cos \left (d x + c\right )^{2} + 21 \, \cos \left (d x + c\right ) - 32\right )} \sin \left (d x + c\right )}{24 \, a^{2} d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.25, size = 87, normalized size = 1.00 \[ \frac {\frac {21 \, {\left (d x + c\right )}}{a^{2}} - \frac {2 \, {\left (75 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 83 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 77 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 21 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{4} a^{2}}}{24 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.67, size = 154, normalized size = 1.77 \[ -\frac {25 \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d \,a^{2} \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{4}}-\frac {83 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{12 d \,a^{2} \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{4}}-\frac {77 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{12 d \,a^{2} \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{4}}-\frac {7 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d \,a^{2} \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{4}}+\frac {7 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d \,a^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.56, size = 206, normalized size = 2.37 \[ -\frac {\frac {\frac {21 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {77 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {83 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} + \frac {75 \, \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}}}{a^{2} + \frac {4 \, a^{2} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {6 \, a^{2} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} + \frac {4 \, a^{2} \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} + \frac {a^{2} \sin \left (d x + c\right )^{8}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{8}}} - \frac {21 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{2}}}{12 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.51, size = 81, normalized size = 0.93 \[ \frac {7\,x}{8\,a^2}-\frac {\frac {25\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{4}+\frac {83\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{12}+\frac {77\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{12}+\frac {7\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4}}{a^2\,d\,{\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}^4} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \frac {\int \frac {\sin ^{4}{\left (c + d x \right )}}{\sec ^{2}{\left (c + d x \right )} + 2 \sec {\left (c + d x \right )} + 1}\, dx}{a^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________